<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"><title>Ubuntu安装Jenkins | 张芃</title><meta name="keywords" content="Linux,服务器,服务部署"><meta name="author" content="张芃"><meta name="copyright" content="张芃"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="我并没有用docker部署jenkins,因为不想在docker里启动jenkins再运行docker项目,所以直接装在了ubuntu服务器里 1.Ubuntu安装Jenkins123456789101112131415161718192021# 判断是否安装jdkjava -version# 如果没有安装jdk，则安装jdksudo apt-get install openjdk-8-jdk#">
<meta property="og:type" content="article">
<meta property="og:title" content="Ubuntu安装Jenkins">
<meta property="og:url" content="https://zhangpeng-1304089575.cos-website.ap-shanghai.myqcloud.com/2021/09/28/%E6%9C%8D%E5%8A%A1/Ubutun%E5%AE%89%E8%A3%85Jenkins/index.html">
<meta property="og:site_name" content="张芃">
<meta property="og:description" content="我并没有用docker部署jenkins,因为不想在docker里启动jenkins再运行docker项目,所以直接装在了ubuntu服务器里 1.Ubuntu安装Jenkins123456789101112131415161718192021# 判断是否安装jdkjava -version# 如果没有安装jdk，则安装jdksudo apt-get install openjdk-8-jdk#">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://zhangpeng-1304089575.cos-website.ap-shanghai.myqcloud.com/img/jenkins.svg">
<meta property="article:published_time" content="2021-09-27T16:00:00.000Z">
<meta property="article:modified_time" content="2022-02-11T05:49:58.242Z">
<meta property="article:author" content="张芃">
<meta property="article:tag" content="Linux">
<meta property="article:tag" content="服务器">
<meta property="article:tag" content="服务部署">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://zhangpeng-1304089575.cos-website.ap-shanghai.myqcloud.com/img/jenkins.svg"><link rel="shortcut icon" href="/img/favicon.png"><link rel="canonical" href="https://zhangpeng-1304089575.cos-website.ap-shanghai.myqcloud.com/2021/09/28/%E6%9C%8D%E5%8A%A1/Ubutun%E5%AE%89%E8%A3%85Jenkins/"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: undefined,
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  source: {
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery@2/dist/fjGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery@2/dist/fjGallery.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isAnchor: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: 'Ubuntu安装Jenkins',
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: true,
  postUpdate: '2022-02-11 13:49:58'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const detectApple = () => {
      if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><meta name="generator" content="Hexo 6.0.0"></head><body><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="/img/avatar.jpg" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="site-data is-center"><div class="data-item"><a href="/archives/"><div class="headline">文章</div><div class="length-num">23</div></a></div><div class="data-item"><a href="/tags/"><div class="headline">标签</div><div class="length-num">11</div></a></div><div class="data-item"><a href="/categories/"><div class="headline">分类</div><div class="length-num">10</div></a></div></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fa fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fa fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fa fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fa fa-folder-open"></i><span> 分类</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url('/img/jenkins.svg')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">张芃</a></span><div id="menus"><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fa fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fa fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fa fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fa fa-folder-open"></i><span> 分类</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">Ubuntu安装Jenkins</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2021-09-27T16:00:00.000Z" title="发表于 2021-09-28 00:00:00">2021-09-28</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2022-02-11T05:49:58.242Z" title="更新于 2022-02-11 13:49:58">2022-02-11</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/Linux/">Linux</a></span></div><div class="meta-secondline"></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><p>我并没有用docker部署jenkins,因为不想在docker里启动jenkins再运行docker项目,所以直接装在了ubuntu服务器里</p>
<h2 id="1-Ubuntu安装Jenkins"><a href="#1-Ubuntu安装Jenkins" class="headerlink" title="1.Ubuntu安装Jenkins"></a>1.Ubuntu安装Jenkins</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 判断是否安装jdk</span></span><br><span class="line">java -version</span><br><span class="line"></span><br><span class="line"><span class="comment"># 如果没有安装jdk，则安装jdk</span></span><br><span class="line">sudo apt-get install openjdk-8-jdk</span><br><span class="line"></span><br><span class="line"><span class="comment"># 再次查看jdk</span></span><br><span class="line">java -version</span><br><span class="line"></span><br><span class="line"><span class="comment"># 将存储库密钥添加到系统</span></span><br><span class="line">wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -</span><br><span class="line"></span><br><span class="line"><span class="comment"># 将Debian包存储库地址附加到服务器的sources.list</span></span><br><span class="line"> <span class="built_in">echo</span> deb http://pkg.jenkins.io/debian-stable binary/ | sudo <span class="built_in">tee</span> /etc/apt/sources.list.d/jenkins.list</span><br><span class="line"></span><br><span class="line">sudo apt-get update</span><br><span class="line"></span><br><span class="line">sudo apt-get install jenkins<span class="comment"># 启动Jenkinssudo systemctl start jenkins# 使用status命令验证是否成功启动sudo systemctl status jenkins</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 查看jenkins进程</span></span><br><span class="line">ps -ef | grep jenkins</span><br></pre></td></tr></table></figure>

<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 查看docker用户组成员</span></span><br><span class="line">root@Colin:~<span class="comment"># cat /etc/group |grep docker</span></span><br><span class="line">docker:x:999:root</span><br><span class="line"><span class="comment"># 将jenkins用户添加到docker组</span></span><br><span class="line">root@Colin:~<span class="comment"># sudo gpasswd -a jenkins docker</span></span><br><span class="line">Adding user jenkins to group docker</span><br><span class="line"><span class="comment"># 查看docker用户组成员</span></span><br><span class="line">root@Colin:~<span class="comment"># cat /etc/group |grep docker</span></span><br><span class="line">docker:x:999:root,jenkins</span><br><span class="line"><span class="comment"># 重新启动docker服务</span></span><br><span class="line">root@Colin:~<span class="comment"># sudo systemctl restart docker</span></span><br><span class="line"><span class="comment"># 赋予权限</span></span><br><span class="line">root@Colin:~<span class="comment"># sudo chmod a+rw /var/run/docker.sock</span></span><br></pre></td></tr></table></figure>
<h2 id="2-配置jenkins"><a href="#2-配置jenkins" class="headerlink" title="2.配置jenkins"></a>2.配置jenkins</h2><p> 　　修改jenkins端口：修改&#x2F;etc&#x2F;default下的jenkins即可，这里修改端口号为8083。然后重启service jenkins restart即可，访问8083端口就可以看到jenkins的页面了。<img src="https://img2020.cnblogs.com/blog/856023/202007/856023-20200702132626308-41424911.png" alt="Image text"><br> 进入&#x2F;var&#x2F;lib&#x2F;jenkins&#x2F;secrets查看密码输入<br> <img src="https://img2020.cnblogs.com/blog/856023/202007/856023-20200702132831454-310244745.png" alt="Image text"><br> 安装推荐的插件,<br> 插件安装完成后，创建一个Jenkins用户</p>
<h3 id="安装node插件"><a href="#安装node插件" class="headerlink" title="安装node插件"></a>安装node插件</h3><p> 点击Manage Jenkins –&gt; Manage Plugins –&gt; available 上面搜索nodejs，选择然后install without restart <img src="https://img2020.cnblogs.com/blog/856023/202007/856023-20200702133748299-1317051559.png" alt="Image text"></p>
<h3 id="选择安装nodejs版本"><a href="#选择安装nodejs版本" class="headerlink" title="选择安装nodejs版本"></a>选择安装nodejs版本</h3><p> 点击左边Manage Jenkins –&gt; Global Tool Configuration<img src="https://img2020.cnblogs.com/blog/856023/202007/856023-20200702134252289-532631215.png" alt="Image text"></p>
<h3 id="新建任务"><a href="#新建任务" class="headerlink" title="新建任务"></a>新建任务</h3><p> 选择 freestyle psoject <p><br> 选择 GitHub project 输入仓库地址 <p><br> Source Code Management 选择Git 配置仓库和证书(私有项目不识别) <p><br> Build Environment 选择Node<br> Build 填两个Execute shell 分别是<br> <figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">echo</span> <span class="variable">$PATH</span> </span><br><span class="line">node -v </span><br><span class="line">npm -v </span><br><span class="line">npm install </span><br><span class="line">npm run build</span><br></pre></td></tr></table></figure></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">docker stop vuenginxapp || <span class="literal">true</span> \</span><br><span class="line">&amp;&amp; docker <span class="built_in">rm</span> vuenginxapp || <span class="literal">true</span> \</span><br><span class="line">&amp;&amp; <span class="built_in">cd</span> /var/lib/jenkins/workspace/booking-centre \</span><br><span class="line">&amp;&amp; docker build -t vuenginxapp . \</span><br><span class="line">&amp;&amp; docker run -d -p 8084:80 --name vuenginxapp -v /var/lib/jenkins/workspace/booking-centre/dist:/usr/share/nginx/html -v /var/lib/jenkins/workspace/booking-centre/nginx.conf:/etc/nginx/nginx.conf vuenginxapp</span><br></pre></td></tr></table></figure>
<p>这里是部署在8084端口<br> var&#x2F;lib&#x2F;jenkins&#x2F;workspace&#x2F;booking-centre 换成对应的路径</p>
<h2 id="3-配置vue项目"><a href="#3-配置vue项目" class="headerlink" title="3.配置vue项目"></a>3.配置vue项目</h2><p>在根目录新增3个文件<p><br>　.dockerignore</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">**/node_modules</span><br><span class="line">**/dist</span><br></pre></td></tr></table></figure>
<p>Dockerfile</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">FROM nginx</span><br><span class="line">EXPOSE 80</span><br></pre></td></tr></table></figure>
<p>nginx.conf</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br></pre></td><td class="code"><pre><span class="line">user  nginx;</span><br><span class="line">worker_processes  1;</span><br><span class="line">error_log  /var/log/nginx/error.log warn;</span><br><span class="line">pid        /var/run/nginx.pid;</span><br><span class="line"></span><br><span class="line">events &#123;</span><br><span class="line">  worker_connections  1024;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">http &#123;</span><br><span class="line">  include       /etc/nginx/mime.types;</span><br><span class="line">  default_type  application/octet-stream;</span><br><span class="line">  log_format  main  &#x27;$remote_addr - $remote_user [$time_local] &quot;$request&quot; &#x27;</span><br><span class="line">                    &#x27;$status $body_bytes_sent &quot;$http_referer&quot; &#x27;</span><br><span class="line">                    &#x27;&quot;$http_user_agent&quot; &quot;$http_x_forwarded_for&quot;&#x27;;</span><br><span class="line">  access_log  /var/log/nginx/access.log  main;</span><br><span class="line">  sendfile        on;</span><br><span class="line">  keepalive_timeout  65;</span><br><span class="line">  server &#123;</span><br><span class="line">    listen       80;</span><br><span class="line">    server_name  localhost;</span><br><span class="line">    location / &#123;</span><br><span class="line">      root   /usr/share/nginx/html;</span><br><span class="line">      index  index.html;</span><br><span class="line">      try_files $uri $uri/ /index.html;</span><br><span class="line">    &#125;</span><br><span class="line">    error_page   500 502 503 504  /50x.html;</span><br><span class="line">    location = /50x.html &#123;</span><br><span class="line">      root   /usr/share/nginx/html;</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<p>最后 不能忘记在云服务器防火墙开放8083和8084端口</p>
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="mailto:undefined">张芃</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="https://zhangpeng-1304089575.cos-website.ap-shanghai.myqcloud.com/2021/09/28/%E6%9C%8D%E5%8A%A1/Ubutun%E5%AE%89%E8%A3%85Jenkins/">https://zhangpeng-1304089575.cos-website.ap-shanghai.myqcloud.com/2021/09/28/%E6%9C%8D%E5%8A%A1/Ubutun%E5%AE%89%E8%A3%85Jenkins/</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="https://zhangpeng-1304089575.cos-website.ap-shanghai.myqcloud.com" target="_blank">张芃</a>！</span></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/Linux/">Linux</a><a class="post-meta__tags" href="/tags/%E6%9C%8D%E5%8A%A1%E5%99%A8/">服务器</a><a class="post-meta__tags" href="/tags/%E6%9C%8D%E5%8A%A1%E9%83%A8%E7%BD%B2/">服务部署</a></div><div class="post_share"><div class="social-share" data-image="/img/jenkins.svg" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/social-share.js/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/social-share.js/dist/js/social-share.min.js" defer></script></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/2021/10/19/%E5%A4%A7%E5%89%8D%E7%AB%AF/Vue/Vue%E5%88%86%E7%8E%AF%E5%A2%83%E6%89%93%E5%8C%85/"><img class="prev-cover" src="/img/vue.svg" onerror="onerror=null;src='/img/404.jpg'" alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">Vue分环境打包</div></div></a></div><div class="next-post pull-right"><a href="/2021/09/08/%E5%A4%A7%E5%89%8D%E7%AB%AF/CSS/SCSS%E6%B7%B7%E5%85%A5/"><img class="next-cover" src="" onerror="onerror=null;src='/img/404.jpg'" alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">SCSS混入</div></div></a></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="/img/avatar.jpg" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">张芃</div><div class="author-info__description"></div></div><div class="card-info-data is-center"><div class="card-info-data-item"><a href="/archives/"><div class="headline">文章</div><div class="length-num">23</div></a></div><div class="card-info-data-item"><a href="/tags/"><div class="headline">标签</div><div class="length-num">11</div></a></div><div class="card-info-data-item"><a href="/categories/"><div class="headline">分类</div><div class="length-num">10</div></a></div></div><a id="card-info-btn" target="_blank" rel="noopener" href="https://gitee.com/zhangpeng_git"><i class="fab fa-github"></i><span>Follow Me</span></a></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span><span class="toc-percentage"></span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#1-Ubuntu%E5%AE%89%E8%A3%85Jenkins"><span class="toc-number">1.</span> <span class="toc-text">1.Ubuntu安装Jenkins</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#2-%E9%85%8D%E7%BD%AEjenkins"><span class="toc-number">2.</span> <span class="toc-text">2.配置jenkins</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%AE%89%E8%A3%85node%E6%8F%92%E4%BB%B6"><span class="toc-number">2.1.</span> <span class="toc-text">安装node插件</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E9%80%89%E6%8B%A9%E5%AE%89%E8%A3%85nodejs%E7%89%88%E6%9C%AC"><span class="toc-number">2.2.</span> <span class="toc-text">选择安装nodejs版本</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%96%B0%E5%BB%BA%E4%BB%BB%E5%8A%A1"><span class="toc-number">2.3.</span> <span class="toc-text">新建任务</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#3-%E9%85%8D%E7%BD%AEvue%E9%A1%B9%E7%9B%AE"><span class="toc-number">3.</span> <span class="toc-text">3.配置vue项目</span></a></li></ol></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/2022/02/11/%E5%A4%A7%E5%89%8D%E7%AB%AF/Vue/Vue%E4%B8%ADkey%E7%9A%84%E5%B7%A5%E4%BD%9C%E5%8E%9F%E7%90%86/" title="Vue中key的工作原理"><img src="/img/vue.svg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Vue中key的工作原理"/></a><div class="content"><a class="title" href="/2022/02/11/%E5%A4%A7%E5%89%8D%E7%AB%AF/Vue/Vue%E4%B8%ADkey%E7%9A%84%E5%B7%A5%E4%BD%9C%E5%8E%9F%E7%90%86/" title="Vue中key的工作原理">Vue中key的工作原理</a><time datetime="2022-02-10T16:00:00.000Z" title="发表于 2022-02-11 00:00:00">2022-02-11</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2022/02/11/%E5%A4%A7%E5%89%8D%E7%AB%AF/Vue/Vue%E5%87%BD%E6%95%B0%E5%BC%8F%E7%BB%84%E4%BB%B6/" title="Vue函数式组件"><img src="/img/vue.svg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Vue函数式组件"/></a><div class="content"><a class="title" href="/2022/02/11/%E5%A4%A7%E5%89%8D%E7%AB%AF/Vue/Vue%E5%87%BD%E6%95%B0%E5%BC%8F%E7%BB%84%E4%BB%B6/" title="Vue函数式组件">Vue函数式组件</a><time datetime="2022-02-10T16:00:00.000Z" title="发表于 2022-02-11 00:00:00">2022-02-11</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2022/02/11/%E5%A4%A7%E5%89%8D%E7%AB%AF/Vue/Vue%E7%89%B9%E6%80%A7%E6%80%BB%E7%BB%93/" title="Vue特性总结"><img src="/img/vue.svg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Vue特性总结"/></a><div class="content"><a class="title" href="/2022/02/11/%E5%A4%A7%E5%89%8D%E7%AB%AF/Vue/Vue%E7%89%B9%E6%80%A7%E6%80%BB%E7%BB%93/" title="Vue特性总结">Vue特性总结</a><time datetime="2022-02-10T16:00:00.000Z" title="发表于 2022-02-11 00:00:00">2022-02-11</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/2022/02/11/%E5%A4%A7%E5%89%8D%E7%AB%AF/Vue/ElementUI/%E8%87%AA%E5%AE%9A%E4%B9%89table/" title="自定义el-table">自定义el-table</a><time datetime="2022-02-10T16:00:00.000Z" title="发表于 2022-02-11 00:00:00">2022-02-11</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2022/02/10/%E5%A4%A7%E5%89%8D%E7%AB%AF/CSS/%E8%A7%A3%E5%86%B3node-sass%E7%9A%84%E5%AE%89%E8%A3%85%E9%97%AE%E9%A2%98/" title="解决node-sass的安装问题"><img src="" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="解决node-sass的安装问题"/></a><div class="content"><a class="title" href="/2022/02/10/%E5%A4%A7%E5%89%8D%E7%AB%AF/CSS/%E8%A7%A3%E5%86%B3node-sass%E7%9A%84%E5%AE%89%E8%A3%85%E9%97%AE%E9%A2%98/" title="解决node-sass的安装问题">解决node-sass的安装问题</a><time datetime="2022-02-09T16:00:00.000Z" title="发表于 2022-02-10 00:00:00">2022-02-10</time></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2020 - 2022 By 张芃</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.umd.js"></script><div class="js-pjax"></div><canvas class="fireworks" mobile="false"></canvas><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/fireworks.min.js"></script></div></body></html>